package org.pps.gl.client.events;

import org.pps.gl.client.LoginInfo;
import com.google.gwt.event.shared.GwtEvent;

public class ConnectedEvent extends GwtEvent<ConnectedEventHandler> {
	public static Type<ConnectedEventHandler> TYPE = new Type<ConnectedEventHandler>();

	private final LoginInfo user;

	public ConnectedEvent(LoginInfo u) {
		this.user = u;
	}

	@Override
	public Type<ConnectedEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ConnectedEventHandler handler) {
		handler.onConnected(this);

	}

	public LoginInfo getUser() {
		return user;
	}

}
